Integrand size = 21, antiderivative size = 145 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\frac {1}{8} \left (3 a^4+24 a^2 b^2+8 b^4\right ) x+\frac {4 a b \left (2 a^2+3 b^2\right ) \sin (c+d x)}{3 d}+\frac {a^2 \left (3 a^2+22 b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {5 a^3 b \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a^2 \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d} \]
[Out]
Time = 0.36 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3926, 4159, 4132, 2717, 4130, 8} \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\frac {5 a^3 b \sin (c+d x) \cos ^2(c+d x)}{6 d}+\frac {4 a b \left (2 a^2+3 b^2\right ) \sin (c+d x)}{3 d}+\frac {a^2 \left (3 a^2+22 b^2\right ) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {a^2 \sin (c+d x) \cos ^3(c+d x) (a+b \sec (c+d x))^2}{4 d}+\frac {1}{8} x \left (3 a^4+24 a^2 b^2+8 b^4\right ) \]
[In]
[Out]
Rule 8
Rule 2717
Rule 3926
Rule 4130
Rule 4132
Rule 4159
Rubi steps \begin{align*} \text {integral}& = \frac {a^2 \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}+\frac {1}{4} \int \cos ^3(c+d x) (a+b \sec (c+d x)) \left (10 a^2 b+3 a \left (a^2+4 b^2\right ) \sec (c+d x)+b \left (a^2+4 b^2\right ) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {5 a^3 b \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a^2 \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}-\frac {1}{12} \int \cos ^2(c+d x) \left (-3 a^2 \left (3 a^2+22 b^2\right )-16 a b \left (2 a^2+3 b^2\right ) \sec (c+d x)-3 b^2 \left (a^2+4 b^2\right ) \sec ^2(c+d x)\right ) \, dx \\ & = \frac {5 a^3 b \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a^2 \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}-\frac {1}{12} \int \cos ^2(c+d x) \left (-3 a^2 \left (3 a^2+22 b^2\right )-3 b^2 \left (a^2+4 b^2\right ) \sec ^2(c+d x)\right ) \, dx+\frac {1}{3} \left (4 a b \left (2 a^2+3 b^2\right )\right ) \int \cos (c+d x) \, dx \\ & = \frac {4 a b \left (2 a^2+3 b^2\right ) \sin (c+d x)}{3 d}+\frac {a^2 \left (3 a^2+22 b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {5 a^3 b \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a^2 \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d}-\frac {1}{8} \left (-3 a^4-24 a^2 b^2-8 b^4\right ) \int 1 \, dx \\ & = \frac {1}{8} \left (3 a^4+24 a^2 b^2+8 b^4\right ) x+\frac {4 a b \left (2 a^2+3 b^2\right ) \sin (c+d x)}{3 d}+\frac {a^2 \left (3 a^2+22 b^2\right ) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {5 a^3 b \cos ^2(c+d x) \sin (c+d x)}{6 d}+\frac {a^2 \cos ^3(c+d x) (a+b \sec (c+d x))^2 \sin (c+d x)}{4 d} \\ \end{align*}
Time = 0.37 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.72 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\frac {12 \left (3 a^4+24 a^2 b^2+8 b^4\right ) (c+d x)+96 a b \left (3 a^2+4 b^2\right ) \sin (c+d x)+24 a^2 \left (a^2+6 b^2\right ) \sin (2 (c+d x))+32 a^3 b \sin (3 (c+d x))+3 a^4 \sin (4 (c+d x))}{96 d} \]
[In]
[Out]
Time = 0.90 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.70
method | result | size |
parallelrisch | \(\frac {24 \left (a^{4}+6 a^{2} b^{2}\right ) \sin \left (2 d x +2 c \right )+32 a^{3} b \sin \left (3 d x +3 c \right )+3 a^{4} \sin \left (4 d x +4 c \right )+96 \left (3 a^{3} b +4 a \,b^{3}\right ) \sin \left (d x +c \right )+36 d x \left (a^{4}+8 a^{2} b^{2}+\frac {8}{3} b^{4}\right )}{96 d}\) | \(101\) |
derivativedivides | \(\frac {a^{4} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {4 a^{3} b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+6 a^{2} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 a \,b^{3} \sin \left (d x +c \right )+b^{4} \left (d x +c \right )}{d}\) | \(116\) |
default | \(\frac {a^{4} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {4 a^{3} b \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+6 a^{2} b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+4 a \,b^{3} \sin \left (d x +c \right )+b^{4} \left (d x +c \right )}{d}\) | \(116\) |
risch | \(\frac {3 a^{4} x}{8}+3 a^{2} b^{2} x +x \,b^{4}+\frac {3 a^{3} b \sin \left (d x +c \right )}{d}+\frac {4 \sin \left (d x +c \right ) a \,b^{3}}{d}+\frac {a^{4} \sin \left (4 d x +4 c \right )}{32 d}+\frac {a^{3} b \sin \left (3 d x +3 c \right )}{3 d}+\frac {\sin \left (2 d x +2 c \right ) a^{4}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) a^{2} b^{2}}{2 d}\) | \(124\) |
norman | \(\frac {\left (-\frac {3}{8} a^{4}-3 a^{2} b^{2}-b^{4}\right ) x +\left (-\frac {9}{8} a^{4}-9 a^{2} b^{2}-3 b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (-\frac {9}{8} a^{4}-9 a^{2} b^{2}-3 b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (-\frac {3}{8} a^{4}-3 a^{2} b^{2}-b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (\frac {3}{8} a^{4}+3 a^{2} b^{2}+b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {3}{8} a^{4}+3 a^{2} b^{2}+b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}+\left (\frac {9}{8} a^{4}+9 a^{2} b^{2}+3 b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (\frac {9}{8} a^{4}+9 a^{2} b^{2}+3 b^{4}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {a^{2} \left (7 a^{2}-24 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {a \left (5 a^{3}-32 a^{2} b +24 a \,b^{2}-32 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{4 d}-\frac {a \left (5 a^{3}+32 a^{2} b +24 a \,b^{2}+32 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{4 d}-\frac {a \left (81 a^{3}-32 a^{2} b -72 a \,b^{2}-288 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{12 d}-\frac {a \left (81 a^{3}+32 a^{2} b -72 a \,b^{2}+288 b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{12 d}+\frac {a^{2} \left (27 a^{2}-64 a b +72 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{6 d}+\frac {a^{2} \left (27 a^{2}+64 a b +72 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{6 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4} \left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{3}}\) | \(529\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 96, normalized size of antiderivative = 0.66 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\frac {3 \, {\left (3 \, a^{4} + 24 \, a^{2} b^{2} + 8 \, b^{4}\right )} d x + {\left (6 \, a^{4} \cos \left (d x + c\right )^{3} + 32 \, a^{3} b \cos \left (d x + c\right )^{2} + 64 \, a^{3} b + 96 \, a b^{3} + 9 \, {\left (a^{4} + 8 \, a^{2} b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{24 \, d} \]
[In]
[Out]
\[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\int \left (a + b \sec {\left (c + d x \right )}\right )^{4} \cos ^{4}{\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.20 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.75 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\frac {3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{4} - 128 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} a^{3} b + 144 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} b^{2} + 96 \, {\left (d x + c\right )} b^{4} + 384 \, a b^{3} \sin \left (d x + c\right )}{96 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 318 vs. \(2 (135) = 270\).
Time = 0.31 (sec) , antiderivative size = 318, normalized size of antiderivative = 2.19 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\frac {3 \, {\left (3 \, a^{4} + 24 \, a^{2} b^{2} + 8 \, b^{4}\right )} {\left (d x + c\right )} - \frac {2 \, {\left (15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 96 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 96 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 9 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 160 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 288 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 160 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 288 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 96 \, a^{3} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 72 \, a^{2} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 96 \, a b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
[In]
[Out]
Time = 12.87 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.85 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^4 \, dx=\frac {3\,a^4\,x}{8}+b^4\,x+3\,a^2\,b^2\,x+\frac {a^4\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {a^4\,\sin \left (4\,c+4\,d\,x\right )}{32\,d}+\frac {a^3\,b\,\sin \left (3\,c+3\,d\,x\right )}{3\,d}+\frac {3\,a^2\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{2\,d}+\frac {4\,a\,b^3\,\sin \left (c+d\,x\right )}{d}+\frac {3\,a^3\,b\,\sin \left (c+d\,x\right )}{d} \]
[In]
[Out]